package com.numberone.iotplatform.service;

import com.numberone.iotplatform.dto.LocationDTO;
import com.numberone.iotplatform.dto.LocationMoveDTO;
import com.numberone.iotplatform.entity.Location;

import java.util.List;

public interface LocationService {
    /**
     * 获取完整的位置树或根据关键字过滤后的位置树
     * @param nameFilter 节点名称过滤器 (可选)
     * @return 位置树列表
     */
    List<LocationDTO> getLocationTree(String nameFilter);

    LocationDTO createLocation(LocationDTO locationDTO);

    LocationDTO updateLocation(Long id, LocationDTO locationDTO);

    void deleteLocation(Long id);

    void moveLocation(Long locationId, Long targetParentId) ;

    void updateSortOrder(List<Long> locationIdsInOrder);

    public String buildLocationPath(Location location);
}